import request from '../utils/request';

/**
 * 文件删除
 */
export const fileDelete = (params) => {
  return request.get(`/project/common/file/delete`, { params });
};

/**
 * 文件下载
 */
export const fileDownload = (params) => {
  return request.get(`/project/common/file/download`, { params });
};

/**
 * 文件预览
 */
export const filePreview = (params) => {
  return request.get(`/project/common/file/preview`, { params });
};

/**
 * 文件上传
 */
export const fileUpload = (data) => {
  return request.post(`/project/common/file/upload`, {
    data,
    header: {
      'Content-Type': 'multipart/form-data',
    },
  });
};
